#ifndef _TABPARSER_H_H
#define _TABPARSER_H_H
#include<iostream>
#include<stdlib.h>
#include<iomanip>
#include<cstring>
#include<string>
#include<vector>
#include<map>
#include<fstream>
#include<string>
#include<sstream>

using namespace std;

#include "TObject.h"
#include "TObjectList.h"

class Tabparser
{
    public:
        explicit Tabparser(string s = ""):m_str(s)
        {
            m_toTable = new TObjectList();
        }
        ~Tabparser()
        {
            destroy();
        };
        
        typedef TObject * (*Function)(string str);
        
        void getstr();
        vector<ItemType> getschema(const string schema_path);
        vector<string> getlines(const string table_path);
        vector<string> split(const string& s, string separate);
        TObjectList * check(string schema_path,string table_path, Function func);
        void vec_display(vector<string> tmp);
        //void display();
        void listlize(vector<string> tmp);
        void destroy();
    private:
        string m_str;
        TObjectList * m_toTable;
};


#endif

